angular.module('jie', ['ionic'])

    .controller('RegisterController', function ($scope, $http) {

        $scope.submit = function () {

            let data = {
                "nickName" : $scope.nickName,
                "mark" : $scope.mark,
                "history" : $scope.history,
                "email" : ""+ $scope.email,
                "password" : $scope.password
            };

            $http.post("/jie/register/save", data).then(
                function success(response) {
                    if(response.data.code == 0){
                        alert("成功");
                    }else{
                        alert("失败");
                    }
                },
                function error(response){
                    alert("请求失败");
                }
            );
        };
    });